package com.dzf.mapper;

import com.dzf.entity.Book;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface BookMapper {
    List<Book> findAll();
    Book findById(int bookid);
    int findByTotal(@Param("book") Map<String,Object> map);
    void bookAdd(Book book);
    void bookUpd(Book book);
    List<Book> findBookByPage(@Param("start")int start,
                              @Param("num")int num,
                              @Param("typeid")int typeid);
    List<Book> findIf(@Param("start")int start, @Param("num")int num, @Param("condition") String condition);
    void addRate(int bookid);
    List<Book> findBookByPageOrd(@Param("start")int start,
                                 @Param("num")int num,
                                 @Param("book")Map<String,Object> map);
    List<Book> findOrd5(String cdt);
    List<Book> findRate5();
    List<Book> findSale5();
    List<Book> findFav5();
}
